package com.health.autoresponse.controller;/**
 * @Author：yuanhongchao
 * @Package：com.health.autoresponse.controller
 * @Project：health-cloud
 * @name：AutoResponse
 * @Date：25/05/2024 12:26 AM
 */

import com.health.autoresponse.servicer.AutoResponseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 *@ClassName AutoResponse
 *@Description 设置自动回复
 *@Author HC.Y
 *@Date 25/05/2024 12:26 AM
 */
@RestController
@RequestMapping("/autoResponse")
public class AutoResponseController {
    /**
     * 自动回复服务
     */
    @Resource
    private AutoResponseService autoResponseService;

    /**
     * 更新状态(开启/关闭自动回复)
     * @param status
     * @return
     */
    @GetMapping("/updateStatus")
    public String updateStatus(@RequestParam Integer status){
        autoResponseService.updateStatus(status);
        return "success";
    }


    /**
     * 更新回复内容
     * @param contentId
     * @return
     */
    @GetMapping("/updateContentId")
    public String updateContentId(@RequestParam Integer contentId){
        autoResponseService.updateContentId(contentId);
        return "success";
    }

    /**
     * 更新自定义回复内容
     * @param content
     * @return
     */
    @GetMapping("/updateCustomContent")
    public String updateCustomContent(@RequestParam String content){
        autoResponseService.updateCustomContent(content);
        return "success";
    }


}
